package com.bdcom.autotest.telnet.constant;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public interface TelnetConstant {
	    public static final String DEFAULT_AIX_PROMPT = "#";

	    public static final String ENTER_COMMAND_ARROW = ">";
	    public static final String ENTER_COMMAND_COLON = ":";

	    public static final String ENTER_COMMAND_BRACKETS = "]";

	    public static final String ENTER="\n";
	    public static final String LOGIN_FAILED="Authentication failed!";
	    public static final String UNKNOW_COMMAND="Unknown command";
	    public static final String PARAMETER_INVALID="Parameter invalid";
	    public static final String INCOMPLETE_COMMAND="Incomplete command";
	    public static final String TIMEOUT="timeout";
	    public static final String Timed_Out="Timed Out";
	    public static final String TOO_MANY_PARAM="Too many parameters";
	    public static final String SUCCEED="successfully";
	    public static final String SERVER_IP_ERROR="server ip address error";
	    public static final String MALLOC_FAIL="malloc fail";
	    public static final String FILESYS_BUSY="filesys is busy";
	    public static final String UNABLE_GET_FILE_SIZE="Unable to get the size of source file";
	    public static final String MEMORY_ALLOC_ERROR="memory alloc error";
	    public static final String FREE_SPACE_NOT_ENOUGH="free space is not enough";
	    public static final String ENTER_FILESYS_ERROR="enter filesys error";
	    public static final String OPEN_FILE_ERROR="open file error";
	    public static final String WRITE_FILE_ERROR="write file error";
	    public static final String FILE_CLOSE_ERROR="file close error";
	    public static final String COPY_ERROR="copy error,free space is not enough";
	    public static final String SYS_MEY_ERROR="sys_mem_reamalloc error,copy error";
	    public static final String COPY_ERROR_NOT_WRITE_FLASH="copy error,free space is not enough,not write to flash";
	    public static final String PASSWORD="password";
	    public static final String ERROR_ENABLE="Error in enable authentication";
	    public static final String ACCESS_DENIED="Access denied";
	    public static final String ERROR_FROM_SERVER="error from server";
	    public static final String USER="user:";
	    public static final String SUCCEED_RETURN="_config#";
	    public static final String RETURN="_config_";
	    public static final String TRANSFORM="transform";
	    public static final String CRYPTO="_crypto_";
	    public static final String FILE_NOT_FOUND="File not found";
	    public static final String WRITE_TO_FILE_ERROR="write to file error";
	    public static final String FORMAT_SUCCEED_FLAG="SYS_CORE_DUMP is wrote";
	    public static final String MONITOR_FLAG="monitor#";
	    public static final String MASTER_UP_FLAG="Press RETURN to get started";
	    public static final String MASTER_PATTERN="Master";
	    public static final String MONITOR_PATTERN="Monitor";

	    
	    
	    public static final String Succeed="Succeed";
	    public static final String Failed="Failed";
	    public static final String Upgrade_Method_SSH="SSH";
	    public static final String Upgrade_Method_Telnet="Telnet";

		public static final long EXEC_CONNECT_TIME= 1100;
		public static final long EXEC_WAIT_FLUSH_TIME_BIG_FILE= 20000;//20S
		public static final long EXEC_WAIT_FLUSH_TIME_LITTLE_FILE= 2000;//2S
		public static final long EXEC_UPGRADE_MASTER_TIME= 2000;//2S
		public static final int EXEC_UPGRADE_MASTER_RETRY_TIME= 150;//等待重试150次，等效于5分钟超时
		public static final long EXEC_USERPASS_TIME= 300;
		public static final long EXEC_ENABLE_TIME= 200;
		public static final long EXEC_ENTER_TIME= 500;
		public static final long EXEC_CMD_TIME= 1000;
		public static final int EXEC_RETRY_TIME= 3;

	    public static final long EXEC_FORMAT_TIME= 1000;//1S
	    public static final int EXEC_FORMAT_RETRY_TIME= 30;//30次
		public static final long EXEC_REBOOT_TIME= 3000;//3S
		public static final int EXEC_REBOOT_RETRY_TIME= 20;//20次

	    public static final long EXEC_PING_TIME= 1000;//1S
	    public static final int EXEC_PING_RETRY_TIME= 10;//10次

	    public static final long EXEC_MONITOR_FORMAT_TIME= 1000;//1S
	    public static final int EXEC_MONITOR_FORMAT_RETRY_TIME= 10;//10次

	    public static final long EXEC_MONITOR_MAC_TIME= 500;//0.5S
	    public static final int EXEC_MONITOR_MAC_RETRY_TIME= 10;//10次

	    public static final long EXEC_MONITOR_IP_TIME= 500;//0.5S
	    public static final int EXEC_MONITOR_IP_RETRY_TIME= 10;//10次

		public static final long EXEC_SHOW_VER_TIME= 500;//0.5S
		public static final int EXEC_SHOW_VER_RETRY_TIME= 30;//30次

		public static final long EXEC_ENTER_MASTER_TIME= 500;//0.5S
		public static final int EXEC_ENTER_MASTER_RETRY_TIME= 240;//240次 总计2分钟

	    public static final int defaultPort=23;
	    public static List<String> upgradeEndFlags= Arrays.asList(SUCCEED,TIMEOUT,SERVER_IP_ERROR,
				UNABLE_GET_FILE_SIZE,FILESYS_BUSY,MALLOC_FAIL,MEMORY_ALLOC_ERROR,FREE_SPACE_NOT_ENOUGH,
				ENTER_FILESYS_ERROR,OPEN_FILE_ERROR,WRITE_FILE_ERROR,FILE_CLOSE_ERROR,COPY_ERROR,
				SYS_MEY_ERROR,COPY_ERROR_NOT_WRITE_FLASH,PASSWORD,ERROR_FROM_SERVER,Timed_Out,FILE_NOT_FOUND,
				WRITE_TO_FILE_ERROR);
	    public static List<String> upgradeEndFlagsForMonitor= Arrays.asList(TIMEOUT,SERVER_IP_ERROR,
			UNABLE_GET_FILE_SIZE,FILESYS_BUSY,MALLOC_FAIL,MEMORY_ALLOC_ERROR,FREE_SPACE_NOT_ENOUGH,
			ENTER_FILESYS_ERROR,OPEN_FILE_ERROR,WRITE_FILE_ERROR,FILE_CLOSE_ERROR,COPY_ERROR,
			SYS_MEY_ERROR,COPY_ERROR_NOT_WRITE_FLASH,PASSWORD,ERROR_FROM_SERVER,Timed_Out,FILE_NOT_FOUND,
			WRITE_TO_FILE_ERROR);
	    public static List<String> EndFlagsForFormatReboot= Arrays.asList(FORMAT_SUCCEED_FLAG,MONITOR_FLAG);

	    
}
